package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "supplier_contact", schema = "boot", catalog = "")
public class SupplierContact {//供应商联系人
    private int supcontactId;//联系人id
    private String supcontactName;//联系人名称
    private String supcontactPhone;//联系人电话
    private Integer supcontactSc;//删除状态
    private Supplier supplierId;//供应商id

    @Id
    @Column(name = "supcontact_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getSupcontactId() {
        return supcontactId;
    }

    public void setSupcontactId(int supcontactId) {
        this.supcontactId = supcontactId;
    }

    @Basic
    @Column(name = "supcontact_name")
    public String getSupcontactName() {
        return supcontactName;
    }

    public void setSupcontactName(String supcontactName) {
        this.supcontactName = supcontactName;
    }

    @Basic
    @Column(name = "supcontact_phone")
    public String getSupcontactPhone() {
        return supcontactPhone;
    }

    public void setSupcontactPhone(String supcontactPhone) {
        this.supcontactPhone = supcontactPhone;
    }

    @Basic
    @Column(name = "supcontact_sc")
    public Integer getSupcontactSc() {
        return supcontactSc;
    }

    public void setSupcontactSc(Integer supcontactSc) {
        this.supcontactSc = supcontactSc;
    }

    @ManyToOne
    @JoinColumn(name = "supplier_id", referencedColumnName = "supplier_id")
    public Supplier getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Supplier supplierId) {
        this.supplierId = supplierId;
    }

    @Override
    public String toString() {
        return "SupplierContact{" +
                "supcontactId=" + supcontactId +
                ", supcontactName='" + supcontactName + '\'' +
                ", supcontactSc=" + supcontactSc +
                ", supplierId=" + supplierId +
                '}';
    }
}
